module decoder_3_8 (S,decoder_out);
    input [2:0]     S;
    output [7:0]    decoder_out;

    reg [7:0]       decoder_out; 

    always @(S)
    begin
        case (S)
            3'h0: decoder_out = 8'h01;
            3'h1: decoder_out = 8'h02;
            3'h2: decoder_out = 8'h04;
            3'h3: decoder_out = 8'h08;
            3'h4: decoder_out = 8'h10;
            3'h5: decoder_out = 8'h20;
            3'h6: decoder_out = 8'h40;
            3'h7: decoder_out = 8'h80;
        endcase
    end
endmodule
